package com.example.indenture.company.service;

import com.example.indenture.common.vo.Result;
import com.example.indenture.common.vo.Search;
import com.example.indenture.company.entity.Company;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpSession;
import javax.transaction.Transactional;

@Service
public interface CompanyService {
    Result<Company> insertCompany(Company company,HttpSession httpSession);
    Result<Company> updateCompany(Company company);
//    Result<Company> loginCompany(String companyName,String password);

    @Transactional
    Result<Company> loginCompany(String username, String password, HttpSession httpSession);

    PageInfo<Company> getCompaniesBySearch(Search search);
    Result<Object> updateCompanyUrl(int id,String url);
    Company getCompanyById(Integer id);
}
